guint window_sort_stale : 1;
/* See GApplication documentation */
- GDBusMenuModel *remote_menu;
GtkActionMuxer *muxer;
char *unique_bus_name;
GDBusConnection *session;
PROP_ID,
PROP_DBUS_ID,
PROP_ACTION_GROUP,
- PROP_MENU,
PROP_APP_INFO
};
if (app->running_state)
g_value_set_object (value, app->running_state->muxer);
break;
- case PROP_MENU:
- if (app->running_state)
- g_value_set_object (value, app->running_state->remote_menu);
- break;
case PROP_APP_INFO:
if (app->info)
g_value_set_object (value, app->info);
g_signal_connect (window, "notify::user-time", G_CALLBACK(shell_app_on_user_time_changed), app);
g_signal_connect (window, "notify::skip-taskbar", G_CALLBACK(shell_app_on_skip_taskbar_changed), app);
- shell_app_update_app_menu (app, window);
+ shell_app_update_app_actions (app, window);
shell_app_ensure_busy_watch (app);
if (!meta_window_is_skip_taskbar (window))
}
void
-shell_app_update_app_menu (ShellApp *app,
- MetaWindow *window)
+shell_app_update_app_actions (ShellApp *app,
+ MetaWindow *window)
{
const gchar *unique_bus_name;
unique_bus_name = meta_window_get_gtk_unique_bus_name (window);
- if (app->running_state->remote_menu == NULL ||
- g_strcmp0 (app->running_state->unique_bus_name, unique_bus_name) != 0)
+ if (g_strcmp0 (app->running_state->unique_bus_name, unique_bus_name) != 0)
{
const gchar *application_object_path;
- const gchar *app_menu_object_path;
GDBusActionGroup *actions;
application_object_path = meta_window_get_gtk_application_object_path (window);
- app_menu_object_path = meta_window_get_gtk_app_menu_object_path (window);
- if (application_object_path == NULL || app_menu_object_path == NULL || unique_bus_name == NULL)
+ if (application_object_path == NULL || unique_bus_name == NULL)
return;
g_clear_pointer (&app->running_state->unique_bus_name, g_free);
app->running_state->unique_bus_name = g_strdup (unique_bus_name);
- g_clear_object (&app->running_state->remote_menu);
- app->running_state->remote_menu = g_dbus_menu_model_get (app->running_state->session, unique_bus_name, app_menu_object_path);
actions = g_dbus_action_group_get (app->running_state->session, unique_bus_name, application_object_path);
gtk_action_muxer_insert (app->running_state->muxer, "app", G_ACTION_GROUP (actions));
g_object_unref (actions);
g_clear_object (&state->cancellable);
}
- g_clear_object (&state->remote_menu);
g_clear_object (&state->muxer);
g_clear_object (&state->session);
g_clear_pointer (&state->unique_bus_name, g_free);
- g_clear_pointer (&state->remote_menu, g_free);
g_slice_free (ShellAppRunningState, state);
}
"The action group exported by the remote application",
G_TYPE_ACTION_GROUP,
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
- /**
- * ShellApp:menu:
- *
- * The #GMenuProxy associated with this ShellApp, if any. See the
- * documentation of #GMenuModel for details.
- */
- g_object_class_install_property (gobject_class,
- PROP_MENU,
- g_param_spec_object ("menu",
- "Application Menu",
- "The primary menu exported by the remote application",
- G_TYPE_MENU_MODEL,
- G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
/**
* ShellApp:app-info:
*